package com.example.eventlistener.controller;

import com.example.eventlistener.publish.MyPublish;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description :
 * @Author : Bruce Lee
 * @CreateTime : 2023/11/21
 */


@Controller
@RequestMapping("/index")
public class MyController {
    @Autowired
    private MyPublish myPublish;

    @GetMapping("/one")
    public void test(){
        myPublish.eventPublish("事件一发布");
    }

    @GetMapping("/two")
    public void test_two(){
        myPublish.eventPublish_two("事件二发布");
    }

}
